package com.hongdee.insurance.quotation.service;

import com.hongdee.insurance.quotation.entity.TInsuranceQuotation;

import java.util.Map;

/**
 * Created by Mr. Xu on 2017/4/26.
 */
public interface ITInsuranceQuotationService {
    /**
     * 保险报价单分页查询
     *
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public Map page(String uid, String start, String limit, Map data) throws Exception;

    /**
     * 详细信息
     * @param qid
     * @return
     * @throws Exception
     */
    public Map getQuotationInfo(String qid,String uid) throws Exception;
    /**
     * 保险报价单明细
     *
     * @param id
     * @return
     * @throws Exception
     */
    public Map info(String id) throws Exception;
    /**
     * 新增或者修改保险报价单
     *
     * @param data
     * @return
     * @throws Exception
     */
    public TInsuranceQuotation saveOrUpdate(TInsuranceQuotation data, String uid,String insurance) throws Exception;

    /**
     * 佣金检测
     * @param syPrice
     * @param uid
     * @param brand
     * @param series
     * @param model
     * @param configure
     * @throws Exception
     */
    public String checkWarningConf(String syPrice,String uid,String brand,String series,String model,String configure) throws Exception;
    /**
     * 报价单详情修改
     * @param data
     * @param uid
     * @throws Exception
     */
    public void update(Map data,String uid,String id)throws Exception;

    /**
     * 获得报价单详情
     * @param id
     * @return
     */
    public TInsuranceQuotation getInsuranceQuotationById(String id) throws Exception;

    /**
     * 删除报价单及保险单信息
     * @param id
     * @throws Exception
     */
    public void delInsuranceById(String id,boolean del)throws Exception;

    /**
     * 根据车辆ID 交强险保费 判断是否超过车辆预警值
     * @param carId
     * @param jqPrice
     * @param uid
     * @return
     * @throws Exception
     */
    public Map checkWarningByCar(String carId,Float jqPrice,String uid) throws Exception;

    /**
     * 获取报价单详情
     * @param id
     * @return
     * @throws Exception
     */
    public TInsuranceQuotation getInfo(String id) throws Exception;

    /**
     * 检测车辆信息 是否在指定的时间内 在同一家保险公司存在相同的报价单
     * @param data
     * @return
     * @throws Exception
     */
    public boolean checkQuotationInfo(TInsuranceQuotation data) throws Exception;

    public void update(TInsuranceQuotation quotation) throws Exception;

    /**
     * 解析壁虎车险读取的车辆报价信息
     * @param uid
     * @param plateNum
     * @param map
     */
    public void analyzeBiHuMsg(String uid,String plateNum,Map<String,Object> map) throws Exception;

    public void updateCarInfoByBIHU(String uid,String plateNum,Map<String,Object> map) throws  Exception;
}
